package com.zzl.finance.data.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.zzl.apidoc.annotation.ApidocModel;
import com.zzl.apidoc.annotation.ApidocModelProperty;
import com.zzl.finance.data.constant.EnterPriseGradeEnum;
import lombok.Data;

import java.util.Date;

/**
 * @author : spp
 * @date : 2021/11/30 14:14
 */
@Data
@ApidocModel
public class BwShowDto {

    @ApidocModelProperty(description = "供应商关系表主键")
    private String id;

    @ApidocModelProperty(description = "企业id")
    private String enterpriseId;
    @ApidocModelProperty(description = "企业名称")
    private String enterpriseName;
    @ApidocModelProperty(description = "企业管理员id")
    private Integer userId;
    @ApidocModelProperty(description = "企业联系人")
    private String userName;
    @ApidocModelProperty(description = "联系方式")
    private String userPhone;
    @ApidocModelProperty(description = "联系人邮箱")
    private String email;
    @ApidocModelProperty(description = "是否时黑名单 0否 1是")
    private Integer isBlackList;

    @ApidocModelProperty(description = "企业评级")
    private Integer enterpriseGrade;

    @ApidocModelProperty(description = "企业评级名称")
    private String enterpriseGradeName;

    public String getEnterpriseGradeName() {
        if (null != enterpriseGrade) {
            EnterPriseGradeEnum.getValue(enterpriseGrade);
        }

        return "";
    }

    @ApidocModelProperty(description = "添加理由")
    private String remark;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApidocModelProperty(description = "更新时间", validate = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApidocModelProperty(description = "添加时间", validate = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    @ApidocModelProperty(description = "黑白名单button名称")
    private String buttonName;

}
